package ar.edu.itba.it.cg.grupo01.game.terrain.proctextures;

import java.awt.Color;

import com.jmex.terrain.util.AbstractHeightMap;

public class StoneProceduralTexture extends CustomProceduralTextureGenerator {

	final Color noNoiseColor = new Color(0.1f, 0.1f, 0.1f);
	final Color fullNoiseColor = new Color(1.0f, 1.0f, 1.0f);
	
	public StoneProceduralTexture(AbstractHeightMap heightMap) {
		super(heightMap);
	}

	@Override
	protected int getTextureColor(int x, int y) {
		float scaleFactor = 0.1f;
        float noise = PerlinNoiseGenerator.noise2(x * scaleFactor, y * scaleFactor);
        Color resultColor = PerlinNoiseGenerator.getPerlinColor(noise, noNoiseColor, fullNoiseColor);
        
        return resultColor.getRGB();
	}

}
